#pragma once
#include <sys/epoll.h>
#include<vector>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <strings.h>
#include<string.h>
#include <unistd.h>
class Epoll
{
public:
    static const int MaxEventNums = 100;
    static const int size = 128;

public:
    Epoll();
    ~Epoll();
    void addfd(int fd,uint32_t event);
    std::vector<epoll_event> loop(int timeout=-1);
private:
    int epollfd_;
    struct epoll_event events_[MaxEventNums];
};